package cz.muni.pa036.hockeyStats;

/***********************************************************************
 * Module:  Arena.java
 * Author:  Rojko
 * Purpose: Defines the Class Arena
 ***********************************************************************/

import java.util.*;

/** @pdOid 1c1ce4a7-31dd-460f-9553-672ea148767e */
public class Arena {
   /** @pdOid 10dcb2cd-42af-4758-961b-b11129f7de1d */
   public int idArena;
   /** @pdOid 3cf5b587-fd70-4d22-b3aa-846b85925a0d */
   public java.lang.String city;
   
   /** @pdRoleInfo migr=no name=Game assc=relationship7 coll=java.util.Collection impl=java.util.HashSet mult=1..* */
   public java.util.Collection<Game> game;
   
   
   /** @pdGenerated default getter */
   public java.util.Collection<Game> getGame() {
      if (game == null)
         game = new java.util.HashSet<Game>();
      return game;
   }
   
   /** @pdGenerated default iterator getter */
   public java.util.Iterator getIteratorGame() {
      if (game == null)
         game = new java.util.HashSet<Game>();
      return game.iterator();
   }
   
   /** @pdGenerated default setter
     * @param newGame */
   public void setGame(java.util.Collection<Game> newGame) {
      removeAllGame();
      for (java.util.Iterator iter = newGame.iterator(); iter.hasNext();)
         addGame((Game)iter.next());
   }
   
   /** @pdGenerated default add
     * @param newGame */
   public void addGame(Game newGame) {
      if (newGame == null)
         return;
      if (this.game == null)
         this.game = new java.util.HashSet<Game>();
      if (!this.game.contains(newGame))
         this.game.add(newGame);
   }
   
   /** @pdGenerated default remove
     * @param oldGame */
   public void removeGame(Game oldGame) {
      if (oldGame == null)
         return;
      if (this.game != null)
         if (this.game.contains(oldGame))
            this.game.remove(oldGame);
   }
   
   /** @pdGenerated default removeAll */
   public void removeAllGame() {
      if (game != null)
         game.clear();
   }

}